package com.kingyun.gpsinspection.purificationservice.facade.service.iam.accessory;


import com.kingyun.gpsinspection.purificationservice.facade.model.iam.accessory.IamOrganizationVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Employee;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Organization;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Ztree;

import java.util.List;

/**
 * Created by yangsy on 2017/2/27.
 */
public interface IamOrganizationService
{

    /**
     * 获取当前人所在组织信息
     * @param userId
     * @return
     */
    Organization organization (String  userId);

    /**
     * 查询操作
     * @param userId
     * @return
     */
    Employee employee(String userId);
    /**
     * 获取当前人所属的作业区
     * @param userId
     * @return
     */
    Organization getWorkZone(String userId);

    /** 加载组织树
     * @param orgId   = null 查询全部组织机构
     * @param sync    = true 异步
     * @param openOrg  = true 组织
     * @param openDept = true 部门
     */
    List<Ztree> loadOrgZtree(String orgId, boolean sync, boolean openOrg, boolean openDept, String keyword);

    /**
     * 只查询组织
     * @param organization
     * @return
     */
    List<Ztree> listOrg(Organization organization);

    /**
     * 根据人员信息
     * 获得当前人员的组织机构
     * @param employee  人员信息
     * @param lessLevel 最小层级
     * @param maxLevel  最大层级
     */
    List<Ztree> getOrganizationList(Employee employee, String maxLevel, String lessLevel);

    /**
     * 根据 组织id查询直属作业区/若orgId为气矿，则查询气矿下所有作业区
     * @param orgId 组织id
     * @return
     */
    List<IamOrganizationVo> getZyqByOrgId(String orgId);

    /**
     * 根据orgId查询查询以此为父节点的组织
     * @param orgId 组织id
     * @return
     */
    List<IamOrganizationVo> getNextOrganizationListByOrgId(String orgId);
}
